package com.happystreet
{
	import com.adobe.serialization.json.JSON;
	import com.happystreet.config.GameConfig;
	import com.happystreet.info.UserInfo;

	/**
	 *根据网页参数设置游戏配置数据
	 * @author Liseen
	 * 
	 */	
	public class FlashVarsCollector
	{
		public function FlashVarsCollector(flashVars:Object)
		{
			var varsKey:String;
			for (varsKey in flashVars)
			{
				switch(varsKey){
					
						
				}
			}
			
			//写死数据
			GameConfig.bridgeUrl = "https://everybodyloves.myshopsgame.com/bridge.php";
			//初始化基础数据
			var tempObj:Object = JSON.decode(GlobalGameConstants.DEFAULT_USER_INFO);
			var userInfo:UserInfo = new UserInfo();
			userInfo.uid = tempObj.uid;
			userInfo.first_name = tempObj.first_name;
			userInfo.name = tempObj.name;
			userInfo.pic_square = tempObj.pic_square;
			GameConfig.userInfo = userInfo;
			GameConfig.gameBasePath = (GameConfig.gameBasePath) ? GameConfig.gameBasePath:GlobalGameConstants.DEFAULT_GAME_ASSETS_PATH;
			GameConfig.userLanguage = (GameConfig.userLanguage) ? GameConfig.userLanguage : GlobalGameConstants.DEFAULT_USER_LANGUAGE;
		}
		
		
	}
}